#pragma once

#include "BeanieCore.h"
#include "ClockPhysics.h"
#include "TemplateVector.h"

enum TEX_CENTER
{
	TEX_TOP,
	TEX_BOT,
	TEX_LEFT,
	TEX_RIGHT,
	TEX_TOPLEFT,
	TEX_TOPRIGHT,
	TEX_BOTLEFT,
	TEX_BOTRIGHT,
	TEX_CENTER,
};

struct spriteSet
{
	char* name;
	int start;
	int end;
};

class GameTexture
{
public:
	//attributes
	BeanieCore* m_core;
	BeanieTexture m_texture;
	
	bool m_bHover;
	bool m_bClick;

	V2DF m_min;
	V2DF m_max;

	V2DF m_pos;
	V2DF m_scl;
	float m_rot;

	bool m_animated;
	float m_aniTick;
	float m_aniTime;
	int m_aniCellHor;
	int m_aniCellVer;
	int m_aniNum;
	int m_aniRow;
	int m_aniCol;

	//ctor & dtor
	GameTexture();
	~GameTexture();

	//main functions
	void initTexture(BeanieCore* a_core, char* a_filePath,
		int a_cen, V2DF a_pos, V2DF a_scl, float a_rot, bool a_camLock);
	void initTexture(BeanieCore* a_core, char* a_filePath,
		int a_cen, V2DF a_pos, V2DF a_scl, float a_rot, bool a_camLock,
		int a_cellHor, int a_cellVer);
	
	virtual void input();
	virtual void update();
	virtual void draw();

	//animation functions
	void aniPlay();
};